#ifndef MAINMENUWINDOW_H
#define MAINMENUWINDOW_H

#include <QMainWindow>
#include <QSqlDatabase>
#include <QtSql>

namespace Ui{
    class TabWidget;
}
class TabWidget : public QTabWidget
{
    Q_OBJECT
public:
    void clearNewUserFields();
    QSqlQueryModel *table;
    QSqlQueryModel *groupTable;
    QSqlQueryModel *teacherComboData;
    QSqlQueryModel *scheduleComboData;
    QSqlQueryModel *classComboData;
    QSqlDatabase db;
    QSqlQuery *myQuery;
    int newCarrerBoxValue;
    int newPlanBoxValue;
    int newUserTypeBoxValue;
    TabWidget(QWidget *parent = 0);
    ~TabWidget();
    int selectedUser;
    int selectedGroup;

    int newGroupScheduleId;
    int newGroupTeacherId;
    int newGroupClassId;


protected:
    void changeEvent(QEvent *e);

private:
    Ui::TabWidget *ui;

private slots:
    void on_searchGroupUpdateBtn_clicked();
    void on_tablaMaterias_clicked(QModelIndex index);
    void on_searchGroupDelBtn_clicked();
    void on_searchGroupDelBox_toggled(bool checked);
    void on_searchGroups_clicked();
    void on_checkBox_toggled(bool checked);
    void on_searchUserUpdate_clicked();
    void on_searchClassCheck_toggled(bool checked);
    void on_searchTeachCheck_toggled(bool checked);
    void on_searchSchedulerCheck_toggled(bool checked);
    void on_newGroupPlanAdd_currentIndexChanged(int index);
    void on_newGroupCarrerAdd_currentIndexChanged(int index);
    void on_newTeacher_currentIndexChanged(int index);
    void on_newClassId_currentIndexChanged(int index);
    void on_newSchedule_currentIndexChanged(int index);
    void on_newCreateGroup_clicked();
    void on_newGroupPlan_currentIndexChanged(int index);
    void on_newGroupCarrer_currentIndexChanged(int index);
    void on_searchUserDelete_clicked();
    void on_tableView_customContextMenuRequested(QPoint pos);
    void on_tableView_clicked(QModelIndex index);
    void on_searchUsers_clicked();
    void on_newGroupCancel_clicked();
    void on_searchNewGroup_clicked();
    void on_newButton_clicked();
    void on_newUserType_currentIndexChanged(int index);
    void on_comboBox_currentIndexChanged(int index);
    void on_newCarrera_currentIndexChanged(int index);
    void on_add_clicked();
    void on_pushButton_clicked();
};

#endif // MAINMENUWINDOW_H
